import yaml,logging,Page

def log_self():
    logging.basicConfig(filename='log.txt',level=logging.DEBUG,filemode='W+',
                        format='%(asctime)s > % (levelname)s > %(messages)')

def send_email(fliepeth):
    email=yaml.SMTP(user='1362804171@qq.com',password='123456Aa',
                    host='smtp.qq.com')
    email.send(to='2331104379@qq.com',subject='下厨房报告',
               contents='下厨房减脂文件',attachemnet=fliepeth)

def set_deta_from_yeml(fliepeth):
    with open(fliepeth,'r',encoding='utf-8')as f:
        return yaml.safe_load(f)


